﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cfg.ConfigValues;
using NUnit.Framework;
using Cfg.Helpers;

namespace Cfg.Test
{
    [TestFixture]
    public class TimeTest
    {
        public static class Config
        {
            public static Time ValidTimeWithAllSegmentsDefined { get; set; }
        }

        [Test]
        public void GetValidTimeWithAllSegments()
        {
            var cv = new ValueBuilder(typeof (Time), "10:20:59.1111");
            var value = (Time) cv.GetValue();

            Assert.AreEqual(10, value.Hours);
        }

        [Test]
        public void Test()
        {
            var arr1 = new int[] { 1, 2, 3};
            var arr2 = new int[] { 4, 5};

            var target = new int[arr1.Length + arr2.Length];
            Array.Copy(arr1, target, arr1.Length);
            Array.Copy(arr2, 0, target, arr1.Length, arr2.Length);

            foreach (var i in target)
            {
                Console.WriteLine(i);
            }
        }
    }
}
